home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-11-05 | 2.4 KB | 59 lines | [TEXT/KAHL] |
- MacYacc & YACC for use with THINK C
- © 1990 Maarten Meijer, Amsterdam
- These files can be distributed as a whole including this copyright notice.
- No responsibility is taken for the results. If you find this program usefull
- drop me a note.
-
- Introduction:
- =============
-
- An implementation of YACC for the Macintosh allowing the creation of left
- right lookahead parsers.
- One should have access to UNIX manuals to understand this program, but an
- example for a calculator is included. There is also an example showing
- the use of uninons. Parsers are usefull for making compilers,
- but also for handling the formula parts in a spreadsheet cell or special
- scripting languages for comms packages.
-
- Installation:
- =============
- YACC, MacYacc APPL and the file yypars.c should be placed in the same
- directory. YACC and yypars.c should not be renamed.
-
- Instructions for use:
- =====================
- Start up MacYacc APPL, click on the file icons to put together the
- instructions to YACC.
- MacYacc is used to create a TEXT file Yacc_Args in the directory
- containing YACC, that contains the following lines:
-
- 1: Full pathname to input file
- 2: Full pathname to output file
- 3: Full pathname to header file to use with LEX
- 4: Full pathname to info file with debugging info
- 5: The name of the parser driver (default yypars.c)
-
- This file is automaticaly opened when YACC starts, allowing use with
- for example MPW. You have to provide your own commando interface though.
- This also allows restarting YACC with the same setups.
- For the moment the output files have creator KAHL for THINK C
- Yacc files should have extension '.y'. Output defaults to extension
- '.yacc.c' for 2, '.yacc.h' for 3, and '.yacc.output' for 3.
- A file containing resources for the parser tables is also created with the
- extension '.yacc.rsrc'. This file is opened by the setup routine in yypars.c
- See code for details on how to skip this.
- The resulting code uses the resources when YACC_RESOURCES is defined.
- If YACC_ALONE is defined, it will not look in a separate resource file.
-
- Origins:
- ========
- Original code by Bruce Denny in 1980.
- This program is a port from a port to the IBM PC, by Scott Guthery in 1985.
- Adaptions to Macintosh (including resource use) by M.J.Meijer
- using THINK C 4.0 in 1990, interface for MacYacc APPL designed & built
- using Prototyper 2.1.
-
- Comments would be appreciated on FidoNet 2:512/114
-
- A version of LEX is in the works, to be named MacLex && LEX.
-